<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Form</title>
</h:head>
<h:body>

	<h:form>
		<p:messages id="mensagens" showDetail="true" />
		<p:commandButton value="Confirmar" onclick="confirmacao.show()"
			type="button" />
		<p:confirmDialog widgetVar="confirmacao" header="Confirmar"
			message="Deseja confirmar alguma coisa?" severity="alert"
			modal="true">
			<p:commandButton value="Sim" update="mensagens"
				oncomplete="confirmacao.hide()"
				actionListener="#{teste3Bean.confirmar}" />
			<p:commandButton value="Não" onclick="confirmacao.hide()"
				type="button" />
		</p:confirmDialog>
	</h:form>

	<p:separator />

	<p:commandButton value="Abrir janela" onclick="janela.show()"
		type="button" />
	<p:dialog widgetVar="janela" header="Novo..." modal="true" width="500"
		height="230">
		<h:form>
			<p:wizard nextLabel="Avançar" backLabel="Voltar">
				<p:tab title="Slider">
					<p:panel header="Testando o slider">
						<h:outputText value="Numero:" />

						<p:inputText id="numero1" value="#{teste3Bean.numeroSlider}" />
						<p:slider for="numero1" minValue="-100" maxValue="100"
							style="width: 127px" />
					</p:panel>
				</p:tab>
				<p:tab title="Spinner">
					<p:panel header="Testando o spinner">
						<h:outputText value="Valor:" />

						<p:spinner value="#{teste3Bean.valorSpinner}" min="-10" max="10"
							stepFactor="0.10" showOn="hover" />
					</p:panel>
				</p:tab>
			</p:wizard>
		</h:form>
	</p:dialog>

	<p:separator />

	<h:form>
		<p:dataTable value="#{teste3Bean.animais}" var="a" paginator="true"
			rows="4">
			<p:column headerText="Nome dos animais">
				<h:outputText value="#{a}" />
			</p:column>
		</p:dataTable>
	</h:form>

	<p:separator />

	<h:form>
		<p:dataGrid value="#{teste3Bean.animais}" var="a" paginator="true"
			columns="2" rows="4">
			<p:column>
				<p:panel header="Animal">
					<h:outputText value="Este animal é um #{a}" />
				</p:panel>
			</p:column>
		</p:dataGrid>
	</h:form>


</h:body>
</html>